import java.util.Scanner;

public class 面向对象 {
    public static void main(String[] args) {
//        创建一个对象,并对角色经行赋值属性
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入id,name,age");

        int id = scanner.nextInt();
        String name = scanner.next();
        int age = 0;
        while (age<18||age>25) {
             age = scanner.nextInt();
                角色 role = new 角色(id, name, age);
                System.out.println(role);
                System.out.println("请重新输入age" +
                        "18~25");
            }
        }
    }


